<%@page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>   
    <base href="<%=basePath%>"/>
    <title>广元电业局低质易耗品管理平台</title>
	<link rel="stylesheet" rev="stylesheet" href="css/style.css" type="text/css" media="all" />
    <link rel="stylesheet" type="text/css" href="css/main.css"/>
     <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.4.2.min.js"></script>   
	<script type="text/javascript" src="${pageContext.request.contextPath}/My97DatePicker/WdatePicker.js"></script>
   
	
<script type="text/javascript">
function showCategory(){
	var x = window.showModalDialog("/SSS/page/daily/CategoryTree.jsp",null,"dialogWidth=300px;dialogHeight=400px");
	var catid=x.substring(0, x.indexOf(",", 0));
	var catname=x.substring((x.indexOf(",", 0)+1), x.length);
	var selectCategory=document.getElementById("selectCategory");
	var category=document.getElementById("category");
	if(catname!="undefined" && catid!="undefined"){
		category.value=catname;
		selectCategory.value=catid;
	}
}
</script>
</head>

<body class="ContentBody">
<form action="updateAssetCard.action" method="post" id="mainForm">
<div class="MainDiv">
	<table width="99%" border="0" cellpadding="0" cellspacing="0" class="CContent">
		  <tr>
		      <th class="tablestyle_title" >资产申报信息修改</th>
		  </tr>
		  <tr>
		    <td class="CPanel">
				<table border="0" cellpadding="0" cellspacing="0" style="width:100%">
				<tr>		
				   <td width="100%">
					  <fieldset style="height:100%;">
						<legend>资产申报信息</legend>	
							<input type="hidden" id="assetCardId" name="assetCard.acid" value="<s:property value='assetCard.acid'/>"/>		      
							<input type="hidden" name="assetCard.acstatus" value="<s:property value='assetCard.acstatus'/>"/>
							<table border="0" cellpadding="2" cellspacing="1" style="width:100%">	
								<tr>									  
								  <td align="right">资产名称:</td>
								     <td>
								     	<input type="text" name="assetCard.acname" style="width:154px;"  value="<s:property value='assetCard.acname'/>"/>
			                            <span style="color: red">*</span>
			                        </td>
								   <td align="right">资产简称:</td>
								   <td ><input name="assetCard.acanothername" type="text" class="text" style="width:154px" value="<s:property value='assetCard.acanothername'/>"/></td>                      			     
								 </tr>		    
								 <tr>
								   <td align="right">资产类别:</td>
								   
								   <td>
								    <input type="text" id="category" readonly="true" style="width:154px"value="<s:property value='assetCard.category.catname'/>"/> 
								    <s:hidden id="selectCategory"  name="catid" value="%{assetCard.category.catid}"/>
							  		
							  		<img src="images/showDep.gif" onclick="showCategory()" style="cursor: pointer;" alt="选择资产类别" title="选择资产类别" />
								   </td>    
								            
								   <td align="right">资产数量:</td>
								   <td><input class="text" name="assetCard.count" style="width:154px" value="<s:property value='assetCard.count'/>"/>
								       <span style="color:red">*</span>
								   </td>  
								 </tr>
								  <tr> 
								   <td align="right">生产厂家:</td>
								    <td><input class="text" name="assetCard.producer" style="width:154px" value="<s:property value='assetCard.producer'/>"/></td> 
								  <td align="right">单&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;价:</td>
								    <td><input class="text" name="assetCard.reportprice" style="width:154px" value="<s:property value='assetCard.reportprice'/>"/></td>				    
								  </tr> 					  		  
								  <tr> 
								    <td align="right">资金来源:</td>
								    <td><input class="text" name="assetCard.assetcomefrom" style="width:154px" value="<s:property value='assetCard.assetcomefrom'/>"/></td>
								 	<td align="right">预计停用日期:</td>
								    <td>
								     <input class="text" name="assetCard.planstopdate" style="width:154px" value=" <fmt:formatDate value='${assetCard.planstopdate}' pattern='yyyy-MM-dd'/>" onclick="WdatePicker()"/>
								     
								    </td>	    				      
								  </tr>       
								  <tr>	
								   	<td align="right">生产日期:</td>
								    <td><input class="text" name="assetCard.producedate" style="width:154px" value="<fmt:formatDate value='${assetCard.producedate}' pattern='yyyy-MM-dd'/>"  onclick="WdatePicker()"/></td>	    				   
								   <td align="right">使用期限:</td>
								    <td><input class="text" name="assetCard.lifetime" style="width:154px" value="<s:property value='assetCard.lifetime'/>"/></td>				    
								  </tr>      
								  <tr>
								   <td align="right">申请部门:</td>
								    <td><s:property value="assetCard.reportdepartment"/>
								    <span style="color:red;">改为：</span>
								     <select name="assetCard.reportdepartment" style="width:158px">
                                       <option selected="selected" value="<s:property value='assetCard.reportdepartment'/>">==请选择==</option>
                                          <s:iterator value="departments">
                                            <s:if test="depid!=0">
                                                 <option value="<s:property value='depname'/>"><s:property value="depname"/></option>
                                            </s:if>
                                          </s:iterator> 
                                    </select>
								    </td>				
								  </tr>      
								  <tr>	
								    <td align="right">申报原因:</td>
					                <td colspan="3"><textarea name="assetCard.reportreason" cols="100" rows="8" ><s:property value="assetCard.reportreason"/></textarea></td>
								  </tr>
						</table>
							  <br />
						</fieldset>
					</td>
				</tr>
				</table>	
		 	</td>
		</tr>			
		<tr>
			<td colspan="2" align="center" height="50px">
			<input type="hidden" name="FN" value="<s:property value='FN'/>" />
			<input type="submit" name="Submit" value="保存" />　
			<input type="button" name="Submit2" value="返回" onclick="window.history.go(-1);"/>
			</td>
		</tr> 
	</table>
</div>
</form>
</body>
</html>

